package com.lg.concurrent.pool;

import java.util.concurrent.LinkedBlockingQueue;

/**
 *  链表形式
 *  用的是 ReentrantLock
 *  可以指定容量  默认容量为 Integer.MAX_VALUE
 *
 */
public class LinkedBlockingQueueTest {
    public static void main(String[] args) throws InterruptedException {
        LinkedBlockingQueue linkedBlockingQueue = new LinkedBlockingQueue();
        linkedBlockingQueue.add("a");
        linkedBlockingQueue.put("b");

        linkedBlockingQueue.peek();
        linkedBlockingQueue.poll();
        linkedBlockingQueue.take();
    }
}
